# 重写sum()方法，自动无视参数里的字符串并返回正确的计算结果


def sum_func_achieve(x):
    total_sum = 0
    for each in x:
        if (type(each) == int) or (type(each) == float):
            total_sum += each
        else:
            continue
    return total_sum


if __name__ == "__main__":
    print(sum_func_achieve([1, 2, 3, 4, 5, "abc", 6, "def"]))